<%=swfupload_head %>
<script type="text/javascript" charset="utf-8">
  var swfu;
  TDK4zjRa3N4LOYPj4BDnNEBBah6rUnuQnbktLWGF1to=
    window.onload = function(){
    
    var settings = {
      flash_url : "/flash/swfupload.swf",
      upload_url: "<%= upload_photos_url-%>?authenticity_token=<%= form_authenticity_token-%>",
      post_params: {},
      file_size_limit : "2 MB",
      file_types : "*.*",
      file_types_description : "All Files",
      file_upload_limit : 20,
      file_queue_limit : 0,
      custom_settings : {
        progressTarget : "fsUploadProgress",
        uploadButtonId : "btnStart"
      },
      debug: false,
      auto_upload:false,

      // Button settings
      button_image_url: "/images/FullyTransparent_65x29.png",
      button_width: "65",
      button_height: "29",
      button_placeholder_id: "spanButtonPlaceHolder",
      button_text: '<span class="theFont">Upload</span>',
      button_text_style: ".theFont { font-size: 16; }",
      button_text_left_padding: 12,
      button_text_top_padding: 3,

      // The event handler functions are defined in handlers.js
      file_queued_handler : fileQueued,
      file_queue_error_handler : fileQueueError,
      file_dialog_complete_handler : fileDialogComplete,
      upload_start_handler : uploadStart,
      upload_progress_handler : uploadProgress,
      upload_error_handler : uploadError,
      upload_success_handler : uploadSuccess,
      upload_complete_handler : uploadComplete,
      queue_complete_handler : queueComplete	// Queue plugin event
    };

    swfu = new SWFUpload(settings);
  }
</script>
<!--S 主体-->
<div class="main" id="my_photo">
  <!--S 主页导航-->
  <%= render(:partial => "/shared/profile_nav") %>
  <!--S 照片列表-->
  <div id="my_sandup_photo" class="mod sandup_photo">
    <!--S 模块标题-->
    <div class="title bg_1">
      <h3>上传照片</h3>
      <a href="javascript:goURL('mphoto')" class="title_link">返回</a>
    </div>
    <!--E 模块标题-->
    <!--S 内容模块-->
    <div class="content">
      <!--S 选择框-->
      <div class="common_upload">
        <form action="<%= upload_photos_url-%>" enctype="multipart/form-data">
          <div id="fsUploadProgress" class="fieldset flash">
            <span class="legend">上传列表</span>
          </div>
          <div>
            <span id="spanButtonPlaceHolder"></span>
            <input id="btnStart" type="button" value="Start Uploads" onclick="swfu.startUpload();" style="margin-left: 2px; font-size: 8pt; height: 29px;"/>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <span id="divStatus">已上传 0 张相片</span>
          </div>
          <%= select "photo", "album_id", current_accounts.albums.collect{|a| [a.name,a.id]} %>
        </form> 
        <div id="divFileProgressContainer" style="height: 75px;"></div>
        <div id="thumbnails"></div>

      </div>
      <!--E 选择框-->
      <div class="info_box">
        <!--S 问题-->
        <div class="side_mod qa_mod">
          <!--S Tags-->
          <div class="title bg_3">
            <h3>上传中遇到问题？</h3>
          </div>
          <!--E Tags-->
          <div class="qa_cont">
            <p class="page_up">如果您想体验更快速的上传可以使用<a href="/user/uploadphoto.htm">极速上传</a></p>
            <p class="qa_link"><a href="http://qzone.qq.com/helpcenter/basic.html#qzone?url=http://qzone.qq.com/helpcenter/basic_info18.htm" target="_blank">上传功能介绍</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://support.qq.com/cgi-bin/beta2/titlelist_simple?pn=0&order=3&fid=46" target="_blank">反馈建议</a></p>
          </div>
        </div>
        <!--E 问题-->
        <!--S 容量告示-->
        <div class="side_mod album_capacity">
          <!--S Tags-->
          <div class="title bg_3">
            <h3>相册容量</h3>
          </div>
          <!--E Tags-->
          <div class="cap_cont">
            <!--注：进度条100%宽度为166px,进度控制里面的p标签的宽度，例如容量占用50%，那么p的宽度控制为 166*50%=88px -->
            <div class="progress bor_2">
              <p style="width:1px" id="percentbar">
                <span>相册容量占用情况</span>
              </p>
            </div>
            <p class="green_cap">
              <em class="bor_2">绿色</em>已用容量 <span id="used">0</span> MB
            </p>
            <p class="white_cap">
              <em class="bor_2">白色</em>剩余容量 <span id="usage">0</span> MB
            </p>
            <p class="qa"><a href="http://qzone.qq.com/helpcenter/basic.html#qzone?url=http://qzone.qq.com/helpcenter/basic_info162.htm" target="_blank">如何升级相册容量？</a></p>
          </div>
        </div>
        <!--E 容量告示-->
      </div>
    </div>
    <!--E 内容模块-->
  </div>
  <!--E 传照片-->
  <!--E 照片列表-->
</div>
<!--E 主体-->
<%= render(:partial => "/albums/album_new_form") %>